home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
zcpp_jae.zip
/
SAMPLES.MAK
< prev
next >
Wrap
Makefile
|
1992-07-14
|
2KB
|
68 lines
# Samples.mak
# -----------
# This makefile compiles the programs samples.cpp and tempsamp.cpp.
# samples.cpp contains some template code that I tested using the ``cpp''
# preprocessor. tempsamp.cpp is the tempsample.c file that came with
# the Texas Instruments package.
#
# The purpose of this makefile is to produce ``.lst'' files. These files
# will show the output of the ``cpp'' processor. A secondary purpose for
# this makefile is to demonstrate how the ``cpp'' processor might be
# incorporated into a makefile for regular use.
#
# This makefile is designed for use with the Zortech C++ compiler, linker,
# and make utility.
#
# Guy C. Gallant, 27Apr91
# General purpose macros.
# -----------------------
# assume ztc and cpp are on the path somewhere.
CC = ztc -c
CPP = cpp.exe
TMPNAME = temppmet.tem
# cpp will look in multiple directories
# only if multiple -I switches are given.
# (now imported from INCLUDE env variable)
#INC_DIR = -Ic:\zortech\include
# another include directory for cpp.
ALT_INC =
# additional compiler flags.
CFLAGS = -b
# Uncomment as necessary.
# -----------------------
# Large model.
#MODEL= -ml
# Small model.
MODEL = -ms
# Rules
# -----
.c.obj:
$(CPP) $(MODEL) $(INC_DIR) $(ALT_INC) $< $(TMPNAME)
$(CC) $(MODEL) $(CFLAGS) -l$*.lst -o$@ $(TMPNAME)
-@del $(TMPNAME) >nul
.cpp.obj:
$(CPP) -D__cplusplus $(MODEL) $(INC_DIR) $(ALT_INC) $< $(TMPNAME)
$(CC) -cpp $(MODEL) $(CFLAGS) -l$*.lst -o$@ $(TMPNAME)
-@del $(TMPNAME) >nul
# Targets
# -------
# Create objects so we can look at the list files.
all: samples.obj incl.obj tempsamp.obj
incl.obj: incl.cpp
samples.obj: samples.cpp
tempsamp.obj: tempsamp.cpp